function [ tiles_desp ] = tiles( x_range, y_range, num_tiles, num_x_box, num_y_box )

    x_side = abs(x_range(2)-x_range(1))/num_x_box;
    y_side = abs(y_range(2)-y_range(1))/num_y_box;

    tiles_desp.num_x = num_x_box+2; % agrego los de cada lado
    tiles_desp.num_y = num_y_box+2;
    tiles_desp.x_side = x_side; 
    tiles_desp.y_side = y_side;

    tiles_desp.num_features = tiles_desp.num_x * tiles_desp.num_y * num_tiles;
    tiles_desp.origin_x(num_tiles) = 0.0; % origen de la celda (2,2)
    tiles_desp.origin_y(num_tiles) = 0.0;

    for t=1:(num_tiles-1)
        r = 1 + (-1-1).*rand(2,1);
        x = r(1) * x_side;
        y = r(2) * y_side;
        tiles_desp.origin_x(t) = x;
        tiles_desp.origin_y(t) = y;
    end

end

